import FormItem from "antd/es/form/FormItem";
import {Cascader} from "antd";
import {CascaderProps} from "./dev.tsx";
import {removeSetter} from "../../../utils/removeSetter.ts";

const CascaderProd =(props:CascaderProps) => {
    const { name,styles,label,rule } = props

    const ComponentProps = removeSetter({...props},["children","parentId"])

    return (
        <div style={styles}>
            <FormItem>
                <FormItem  label={label} name={name} rules={rule} style={{margin:"0",...styles}}>
                    <Cascader {...ComponentProps}   />
                </FormItem>
            </FormItem>

        </div>
    );
};

export default CascaderProd;